package com.bana.fvs.app.mvp.contract;

import android.app.Activity;

import com.bana.fvs.app.module.detaile.entity.AreaControllerDetailBean;
import com.bana.fvs.app.module.detaile.entity.CommonEntity;
import com.bana.fvs.app.module.detaile.entity.FogAreaInfoBean;
import com.bana.fvs.app.module.detaile.entity.FoglightDetailInfo;
import com.bana.fvs.app.module.detaile.entity.UpdateWorkModeResultBean;
import com.bana.fvs.app.module.detaile.entity.VisibilityControllerDetailBean;
import com.bana.fvs.app.mvp.model.BaseModel;
import com.bana.fvs.app.mvp.presenter.BasePresenter;
import com.bana.fvs.app.mvp.view.IBaseView;
import com.wei.commonlibrary.net.OkhttpRequest;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * Author : yanftch
 * Date : 2018/3/2
 * Time : 22:26
 * Desc :
 */

public interface DetailContract {
    abstract class AbsDetailModel extends BaseModel {
        /**
         * 雾区详情
         *
         * @param
         * @param token
         * @return
         */
        public abstract OkhttpRequest http_fogAreaEquipment(String token, String wqbm);

        /**
         * 雾灯详情
         *
         * @param token
         * @param sbbm
         * @return
         */
        public abstract OkhttpRequest http_foglightEquipment(String token, String sbbm,String kzpbm);

        /**
         * 区域控制器
         *
         * @param token
         * @param sbbm  设备编码
         * @return
         */
        public abstract OkhttpRequest http_controllerEquipment(String token, String sbbm);

        /**
         * 能见度检测仪
         *
         * @param token
         * @param sbbm  设备编码
         * @return
         */
        public abstract OkhttpRequest http_visibilityDetectionquipment(String token, String sbbm);


        /**
         * 是否定时
         *
         * @param token
         * @return
         */
        public abstract OkhttpRequest http_updateFogAreaTimer(String token, String wqbh,boolean sfds);

        /**
         * 修改雾灯控制
         * @param token
         * @param data
         * @param
         * @return
         */
        public abstract OkhttpRequest http_foglightWorkModeUpdate(String token, HashMap<String, Object> data);
    }

    abstract class AbsDetailPresnter extends BasePresenter<AbsDetailModel, AbsDetailView> {
        public abstract void http_fogAreaEquipment(Activity activity, String token, String wqbm);

        public abstract void http_foglightEquipment(Activity activity, String token, String sbbm,String kzpbm);

        public abstract void http_controllerEquipment(Activity activity, String token, String sbbm);

        public abstract void http_visibilityDetectionEquipment(Activity activity, String token, String sbbm);

        public abstract void http_updateFogAreaTimer(Activity activity, String token, String wqbh,boolean sfds);

        public abstract void http_foglightWorkModeUpdate(Activity activity, String token, HashMap<String, Object> data);
    }

    interface AbsDetailView extends IBaseView<AreaControllerDetailBean> {
        void fogAreaInfo(FogAreaInfoBean fogAreaInfoBean);

        void foglightInfo(FoglightDetailInfo foglightDetailInfo);

        void visibilityDetectInfo(VisibilityControllerDetailBean bean);

        void updateFogAreaTimerInfo(CommonEntity entity);

        void updtaeFogLightMode(ArrayList<UpdateWorkModeResultBean.Item2Bean> updateWorkModeResultBean);
    }
}
